<form action="" class="form-horizontal" role="form">

	<div class="form-group">
		<label class="col-sm-2 control-label">楼盘名称</label>
		<div class="col-sm-3">
			<input type="text" class="form-control" name="name" placeholder="请输入楼盘名称"
				datatype="*" value="{$house.name}" />
		</div>
	</div>
	<div class="form-group">
		<label class="col-sm-2 control-label">状态</label>
		<div class="col-sm-3">{$house.status}</div>
	</div>

	<div class="form-group">
		<div class="col-sm-offset-2 col-sm-8">
			<input type="hidden" name="id" value="{$house.id}" /> <a
				class="btn btn-default" onclick="javascript:history.go(-1)">返回上页</a>
			<a class="btn btn-default" onclick="self.location=document.referrer">返回上页并刷新</a>
			<button type="submit" class="btn btn-primary submit"
				data-loading-txt="提交中，请稍后……" data-ajax-url="__CONTROLLER__/save">保存更改</button>
		</div>
	</div>
</form>

<!-- uploadify -->
<link rel="stylesheet" href="__PUBLIC__/Style/Common/uploadify/uploadify.css">
<script type="text/javascript" src="__PUBLIC__/Style/Common/uploadify/jquery.uploadify.min.js?{:rand(0,9999)}"></script>
<script type="text/javascript">
  $("#upload-image").uploadify({
    'multi'      :  true,
    'buttonClass'  :  'margin-bottom',
    'fileSizeLimit' :   '200kb',
    'buttonText'  :  '上传图片',
    'fileTypeDesc'   :   'Image Files',
    'fileTypeExts'   :   '*.jpg; *.png',
    'swf'      :   '__PUBLIC__/Style/Common/uploadify/uploadify.swf',
    'uploader'    :   '__MODULE__/Upload/uploadOne',
    'onUploadStart'  :  function(){},
    'onUploadSuccess'  : function(data, res){
      
      var url = eval("(" + res + ")").extra.url;
      $("#house_image").val( url );      
    }
  });
  
  //经过图片路径文本框时显示预览图片
  var img = $("<img>");
  $("#house_image").on("mouseover", function( e ){
	  $(this).parent().css({"position": "relative"});
	  $(img).attr( "src", $(this).val() );
	  $(img).css( {"position":"absolute", "top":0, "left":"100%", "maxWidth": "200px"} );
	  $(img).appendTo( $(this).parent() );
  });
  $("#house_image").on("mouseout", function( e ){
	  $(img).remove();
  });
</script>